package com.example.haojiutao.utils;

import com.example.haojiutao.model.domain.User;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Author: cheng_jianzhen
 * @CreateTime: 2024/2/4 14:56
 */
@Component
public class H5LoginUserUtil {

    public static ThreadLocal<User> threadLocal = new ThreadLocal<>();

    public static User getLoginUser() {
        return threadLocal.get();
    }

    public static void setLoginUser(User user) {
        threadLocal.set(user);
    }
}

